<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

require_once './app/PHPMailer_v5.1/class.phpmailer.php';

$mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch

try {
  $mail->AddAddress('gomes.dc@gmail.com', 'Daniel Gomes');
  $mail->SetFrom('no-reply@vantilcargas.com.br', 'Vantil Cargas');
//  $mail->AddReplyTo('name@yourdomain.com', 'First Last');
  $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
//  $mail->ContentType = "text/html; charset=iso-8859-1";
  $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
  $mail->MsgHTML('<html><body style="text-align:center; font-size: 20px"><img src="'.$url_site.'imagens/logo_flash.png"></img><br/>Seja bem vindo ao vantil cargas<br/>Clique aqui para validar seu e-mail</body></html>');
//  $mail->AddAttachment('images/phpmailer.gif');      // attachment
//  $mail->AddAttachment('imagens/logo_flash.png', 'logo_flash.png'); // attachment
  $mail->Send();
  echo "Message Sent OK<p></p>\n";
} catch (phpmailerException $e) {
  echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
  echo $e->getMessage(); //Boring error messages from anything else!
}


?>
